import { ref, computed } from 'vue'

export function usePagination(pageSize = 20) {
  const page = ref(1)
  const total = ref(0)
  const offset = computed(() => (page.value - 1) * pageSize)
  return { page, pageSize, total, offset }
}
